<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username',255)->nullable()->comment('用户名');
            $table->string('email',255)->nullable()->comment('邮箱');
            $table->string('mobile',255)->comment('手机');
            $table->string('password',255)->comment('密码');
            $table->boolean('verified')->default(0)->comment('是否验证');
            $table->integer('type_id')->default(1)->comment('用户类别');
            $table->string('avatar_url')->nullable()->comment('头像');
            $table->string('thumb_avatar_url')->nullable()->comment('头像缩略图');
            $table->rememberToken();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
